﻿@{
    if (this.Request.Form["Button1"] == "Purge Tile Cache")
    {
        MyModel.status.Purge();        
    }
    
    if (this.Request.Form["Button2"] == "Purge Database Cache")
    {
        MyModel.flushDB.ClearAllCaches();
    }
    
    Page.Title = "Laos Traveller";
    Layout = "LaosLayout.cshtml"; 
}
<h1>
    Laos Traveller - Server Status</h1>
@Html.Raw(MyModel.status.GetStatus())
<form name="form1" method="post" action="serverstatus.cshtml" id="form1">
    <p>
    <br />
    <input type="submit" name="Button1" value="Purge Tile Cache" id="Button1" />
</p>
</form>

<form name="form1" method="post" action="serverstatus.cshtml" id="form1">
    <p>
    <br />
    <input type="submit" name="Button2" value="Purge Database Cache" id="Button2" />
</p>
</form>